home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16940 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.2 KB  |  50 lines

  1. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  2. Path: undergrad.math.uwaterloo.ca!clgonsal
  3. From: clgonsal@undergrad.math.uwaterloo.ca (Carl Laurence Gonsalves)
  4. Subject: Re: Young programmers read me.
  5. Sender: news@undergrad.math.uwaterloo.ca (news spool owner)
  6. Message-ID: <DprAy7.Kv1@undergrad.math.uwaterloo.ca>
  7. Date: Fri, 12 Apr 1996 15:56:31 GMT
  8. References: <4icpp9$7hr@barad-dur.nas.com> <Pine.OSF.3.91.960411093444.20958D-100000@bud.cc.swin.edu.au> <gfarrow.829193316@rainbow> <jsm16-1104960959080001@ups02.cit.cornell.edu>
  9. Nntp-Posting-Host: lhopital.uwaterloo.ca
  10. Organization: University of Waterloo
  11.  
  12. In article <jsm16-1104960959080001@ups02.cit.cornell.edu>,
  13. James Margaris <jsm16@cornell.edu> wrote:
  14. >In article <gfarrow.829193316@rainbow>, gfarrow@rainbow.rmii.com (Glenn
  15. >Farrow) wrote:
  16. >
  17. >> John Joseph Newbigin <079519@bud.cc.swin.edu.au> writes:
  18. >> 
  19. >> >But it is a lot easier to read
  20. >> 
  21. >> >if(something_happened)
  22. >> >{
  23. >> >     do_something_else();
  24. >> >}
  25. >> >is_n't_it();   :)
  26. >> 
  27. >> Nonesense.  This style is extremely annoying because it spreads the code out
  28. >> too much, it increases the amount you have to page around a source file.  
  29. >> Putting "{" on a separate line is a waste of space that should be occupied
  30. >> by code.
  31. >
  32. >   It seems to me that addding a few extra lines is well worth the
  33. >readability. Matching up curly braces is so much easier when they are
  34. >indented to the same level.
  35.  
  36. You're assuming that the spread-out style is easier to read. It may be for
  37. you. It used to be for me too, a couple of years ago. But then I switched
  38. to the "opening brace on the same line" style, and after using it for two
  39. years I find it much easier to read. Readability is very subjective.
  40.  
  41. As for finding the matching brace, usually the indentation level is enough
  42. to understand the code. If I *really* need to find the matching brace
  43. though, every editor I use has a "find matching brace" function.
  44.  
  45. -- 
  46.         Carl Laurence Gonsalves - clgonsal@undergrad.math.uwaterloo.ca
  47.                    Computer Science, University of Waterloo
  48.                http://www.undergrad.math.uwaterloo.ca/~clgonsal/
  49.                    http://www.csclub.uwaterloo.ca/~clgonsal/
  50.